package com.lyj.mapper;

import com.lyj.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface NurseMapper {

    Nurse login(String username, String password, String duty);
    Boolean updateNurseById(Nurse nurse);
    //根据护工nurseId查询他所管理的老人。
    List<OldMan> queryOldManByNurseId(int nurseId);
    List<NurseSalary> querySalaryByNurseId(int nurseId);
    Boolean vacation(Vacation vacation);
    List<Vacation> queryAllByNurseId(int nurseId);
    Boolean updateVacation(Vacation vacation);

    //查询老人的备用护工（评价高的护工id）
    Satisfaction querySatisNurseByoldId(int oldId);
    //查找没有请假的备用护工
    Vacation queryNoVacationNurse(int nurseId);
    //更改老人护工
    Boolean updateOldManNurseId(@Param("oldId") int oldId,@Param("nurseId") int nurseId,@Param("username") String username);
    //查询护工姓名
    Nurse queryNurseById(int nurseId);
    //查询所有护工为空的老人
    List<OldMan> queryOldManNurseNull();

}
